/*
 * Copyright(c) 2018-? the original author[Wien(luweien@aliyun.com)] or authors.
 *
 */
package org.doll.it.sequence.vo;

import org.doll.it.base.vo.RootVO;
import org.doll.it.sequence.enums.BusinessTypeEnum;

import lombok.Builder;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * 1位符号位 + 41位时间戳 + 3位实例Id + 9位业务id + 10位流水码 = 64位long
 * 
 * @author Wien(luweien@aliyun.com)
 *
 */
@Data
@Builder
@EqualsAndHashCode(callSuper = true)
public class SnowFlakeVO extends RootVO {

	/**
	 * Id
	 */
	private Long id;

	/**
	 * 时间戳，生成时间
	 */
	private Long timestamp;

	/**
	 * 实例Id
	 */
	private Long instanceId;

	/**
	 * 业务Id
	 */
	private Long businessId;

	/**
	 * 业务类型
	 */
	private BusinessTypeEnum businessType;

	/**
	 * 序列号
	 */
	private Long sequence;

}
